home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 16
/
AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso
/
pd
/
anwendungen
/
ispell-3.1.18bin
/
interfaces
/
guispell-1.1
/
rexx
/
ced
/
wordspellcallback.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-09-21
|
1KB
|
48 lines
/*
* WordSpellCallBack.rexx ... needed by WordSpell.ced.
* Copyright © 1991, 1992 Loren J. Rittle
* Reworked for GUISpell public release: Thu Mar 26 02:12:39 1992 LJR
* Use as you will, just document your changes and keep my copyright
* notice intact.
*
* Loren J. Rittle
* rittle@comm.mot.com
*/
options results
address 'rexx_ced'
parse arg oldbytepos oldlinepos olditem
status 87; bytepos = result; if bytepos ~= oldbytepos then exit;
status 57; linepos = result; if linepos ~= oldlinepos then exit;
status 55; line = result;
parse var line curline '0a'x
curpos = 0
do forever
curpos=pos('09'x, curline, curpos+1)
if curpos == 0 then break
curline = overlay(' ', curline, curpos)
end
do i = 1 to words(curline)
if wordindex(curline, i)-1 > bytepos then
break
end
item = compress( word( curline, i-1 ), ' ~`,./<>?;:"[]{}!@#$%^&*()+|=\' )
if item ~= olditem then exit;
address 'GUISpell' currenttext
replacementword = result
right
search for... item 0 0 0 1
if rc ~= 0 then exit;
status 57; linepos = result; if linepos ~= oldlinepos then exit;
left
replace item replacementword 0 0 1 1
exit